import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl } = url();

// 导入url
export const importUrl = `${mesUrl}mesCabinetKey/import`;
// 导出url
export const exportUrl = `${mesUrl}mesCabinetKey/export`;
// 导出模板url
export const exportExportUrl = `${mesUrl}mesCabinetKey/export/model`;

// 分页查询
export function getList (params = {}) {
  return request({
    url: `${mesUrl}mesCabinetKey`,
    method: "get",
    params,
  });
}
// 列表不分页查询
export function getAllList (params = {}) {
  return request({
    url: `${mesUrl}mesCabinetKey/list`,
    method: "get",
    params,
  });
}
// 新增
export function rowCreate (data = {}) {
  return request({
    url: `${mesUrl}mesCabinetKey`,
    method: "post",
    data,
  });
}
// 修改
export function rowUpdate (data = {}) {
  return request({
    url: `${mesUrl}mesCabinetKey`,
    method: "put",
    data,
  });
}
// 删除
export function rowDel (ids) {
  return request({
    url: `${mesUrl}mesCabinetKey/${ids}`,
    method: "delete",
  });
}
// 详情
export function rowDetail (id) {
  return request({
    url: `${mesUrl}mesCabinetKey/info/${id}`,
    method: "get",
  });
}
// 迁移
export function infoTransfer (params = {}) {
  return request({
    url: `${mesUrl}mesCabinetKey/transfer`,
    method: "get",
    params
  });
}
